home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / internet / other / ka9q / ka9q_src.arc / NETUSER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-28  |  1.1 KB  |  38 lines

  1. /* Global structures and constants needed by an Internet user process */
  2. extern char hosts[];     /* Host table */
  3.  
  4. #define    NCONN    20        /* Maximum number of open network connections */
  5.  
  6. extern int32 ip_addr;    /* Our IP address */
  7.  
  8. extern int net_error;    /* Error return code */
  9. #define    NONE    0        /* No error */
  10. #define    CON_EXISTS    1    /* Connection already exists */
  11. #define    NO_CONN    2        /* Connection does not exist */
  12. #define    CON_CLOS    3    /* Connection closing */
  13. #define    NO_SPACE    4    /* No memory for TCB creation */
  14. #define    WOULDBLK    5    /* Would block */
  15. #define    NOPROTO        6    /* Protocol or mode not supported */
  16. #define    INVALID        7    /* Invalid arguments */
  17.  
  18. /* Codes for the tcp_open call */
  19. #define    TCP_PASSIVE    0
  20. #define    TCP_ACTIVE    1
  21. #define    TCP_SERVER    2    /* Passive, clone on opening */
  22.  
  23. /* Socket structure */
  24. struct socket {
  25.     int32 address;        /* IP address */
  26.     int16 port;            /* port number */
  27. };
  28.  
  29. /* Connection structure (two sockets) */
  30. struct connection {
  31.     struct socket local;
  32.     struct socket remote;
  33. };
  34. #define    NULLSOCK    (struct socket *)0
  35. int32 aton(),resolve();
  36. char *inet_ntoa(),*psocket();
  37. long htol();
  38.